﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:GameLogic_Logic="clr-namespace:GameLogic.Logic;assembly=GameLogic"
    mc:Ignorable="d"
    x:Class="TestUi.Content.CollisionTypeGame"
    d:DesignWidth="640"
    d:DesignHeight="480">

    <Grid
        x:Name="LayoutRoot"
        Width="400"
        Height="400">
    	<i:Interaction.Behaviors>
    		<GameLogic_Logic:GameLoop/>
    	</i:Interaction.Behaviors>
        <Grid
            x:Name="_field">
            <Grid.Background>
                <LinearGradientBrush
                    EndPoint="0.5,1"
                    StartPoint="0.5,0">
                    <GradientStop
                        Color="#FF7D7EE7"
                        Offset="0" />
                    <GradientStop
                        Color="#FF009316"
                        Offset="0.735" />
                </LinearGradientBrush>
            </Grid.Background>
            <Rectangle
                x:Name="_bottom"
                Fill="#FF277000"
                Height="20"
                VerticalAlignment="Bottom">
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:StaticCollidableBehavior />
                </i:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                x:Name="_top"
                Fill="#FFD9DBEF"
                Height="20"
                VerticalAlignment="Top">
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:StaticCollidableBehavior />
                </i:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                x:Name="_left"
                Width="20"
                HorizontalAlignment="Left">
                <Rectangle.Fill>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#FFD9DBEF"
                            Offset="0" />
                        <GradientStop
                            Color="#FF277000"
                            Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:StaticCollidableBehavior />
                </i:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                x:Name="_right"
                Width="20"
                HorizontalAlignment="Right">
                <Rectangle.Fill>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#FFD9DBEF"
                            Offset="0" />
                        <GradientStop
                            Color="#FF277000"
                            Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:StaticCollidableBehavior />
                </i:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                x:Name="_clamp"
                HorizontalAlignment="Left"
                Width="50"
                Stroke="#FF020101"
                StrokeThickness="2"
                Height="50"
                VerticalAlignment="Top"
                ToolTipService.ToolTip="Clamp"
                Margin="50,50,0,0">
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:MovingCollidableBehavior
                        CollisionEnabled="True"
                        AutoStart="True"
                        Direction="90"
                        Speed="3" />
                </i:Interaction.Behaviors>
                <Rectangle.Fill>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#FFCAA110" />
                        <GradientStop
                            Color="#FF312808"
                            Offset="0.991" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Rectangle
                x:Name="_bounce"
                Stroke="#FF020101"
                StrokeThickness="2"
                Height="50"
                VerticalAlignment="Top"
                HorizontalAlignment="Center"
                Width="50"
                Margin="0,50,0,0"
                ToolTipService.ToolTip="Bounce">
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:MovingCollidableBehavior
                        CollisionEnabled="True"
                        AutoStart="True"
                        Direction="90"
                        Speed="3"
                        CollisionType="Bounce" />
                </i:Interaction.Behaviors>
                <Rectangle.Fill>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#FFE56C58" />
                        <GradientStop
                            Color="#FF4B1E0D"
                            Offset="0.991" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Rectangle
                x:Name="_none"
                Stroke="#FF020101"
                StrokeThickness="2"
                Height="50"
                VerticalAlignment="Top"
                HorizontalAlignment="Right"
                Width="50"
                Margin="0,50,50,0"
                ToolTipService.ToolTip="None">
                <i:Interaction.Behaviors>
                    <GameLogic_Logic:MovingCollidableBehavior
                        CollisionEnabled="True"
                        AutoStart="True"
                        Direction="90"
                        Speed="3"
                        CollisionType="none" />
                </i:Interaction.Behaviors>
                <Rectangle.Fill>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#FFD5E011" />
                        <GradientStop
                            Color="#FF54621A"
                            Offset="0.991" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
        </Grid>
    </Grid>
</UserControl>